let x = []
let data1 = []
let data2 = []
let j=3
for(let i=8;i<=24;i+=2){
  let n = i<10 ? `0${i}` : i
  x.push(n)
  let m = 0
  let f = Math.round(Math.random()*10000)
  if(j%3 == 1){
    m = f
  }
  if(j%3 == 2){
    m = -f
  }
  // 0  1 2    3 4 5    6 7 8   9  10 11
  // 0 m -m   0 m -m
  data1.push(30000+m)
  data2.push(30000-m)
  j++
}
export default {
  title: {
    text: 'Stacked Line'
  },
  tooltip: {
    trigger: 'axis'
  },
  legend: {
    data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  toolbox: {
    feature: {
      saveAsImage: {}
    }
  },
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: x
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      name: 'Email',
      type: 'line',
      // stack: 'Total',
      data: data1,
      smooth: true,
      symbol: 'none',
      lineStyle: {
        color: '#2879FF',
        width: 3
      },
    },
    {
      name: 'Video Ads',
      type: 'line',
      // stack: 'Total',
      data: data2,
      smooth: true,
      symbol: 'none',
      lineStyle: {
        color: '#F6AE07',
        width: 3
      },
    }
  ]
};